﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="CurrencyManagement.aspx.cs" Inherits="MLM.AdminCP.Pages.CurrencyManagement" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Label runat="server" ID="CurrencyLb" Text="Currency Management" 
        meta:resourcekey="CurrencyLbResource1"></asp:Label>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <telerik:RadGrid ID="RadCurrencyGrid" runat="server"
        DataSourceID="GroupCurrencyEds" AllowPaging="True" AllowSorting="True" GridLines="None"
        ShowGroupPanel="True"  AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
        AllowAutomaticDeletes="True" ShowFooter="True" ShowStatusBar="True" 
        meta:resourcekey="RadCurrencyGridResource1">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="CurrencyID" DataSourceID="GroupCurrencyEds"
            ShowHeader="true" ShowHeadersWhenNoRecords="true" AllowAutomaticInserts="true"
            CommandItemDisplay="TopAndBottom">
            <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true"></CommandItemSettings>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="CurrencyID" DataType="System.Int64" HeaderText="CurrencyID"
                    ReadOnly="True" SortExpression="CurrencyID" UniqueName="CurrencyID" 
                    meta:resourcekey="GridBoundColumnResource1">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
                    UniqueName="Name" meta:resourcekey="GridBoundColumnResource2">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CurrencyCode" HeaderText="CurrencyCode" SortExpression="CurrencyCode"
                    UniqueName="CurrencyCode" meta:resourcekey="GridBoundColumnResource3">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CurrencySign" HeaderText="Currency Sign" SortExpression="CurrencySign"
                    UniqueName="CurrencySign" meta:resourcekey="GridBoundColumnResource4">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn runat="server" HeaderText="Rate" 
                    AllowFiltering="false" SortExpression="Rate"
                    UniqueName="Rate" meta:resourcekey="GridTemplateColumnResource1">
                    <ItemTemplate>
                        1€ =
                        <%#Eval("Rate") %>
                        <%#Eval("CurrencySign") %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                    UniqueName="EditCommandColumn" 
                    meta:resourcekey="GridEditCommandColumnResource1">
                    <ItemStyle CssClass="MyImageButton"></ItemStyle>
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                    UniqueName="DeleteColumn" meta:resourcekey="GridButtonColumnResource1">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings EditFormType="Template">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
                <FormTemplate>
                    <table id="Table2" style="border-collapse: collapse; padding-left: 20">
                        <tr class="EditFormHeader" style="height: 30">
                            <td style="font-size: small" colspan="2">
                                <asp:Label runat="server" ID="Label2" Text="Currency Detail" 
                                    meta:resourcekey="Label2Resource1"></asp:Label>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td class="titlename">
                                <asp:Label runat="server" ID="NameLb" Text="Name:" 
                                    meta:resourcekey="NameLbResource1"></asp:Label>
                            </td>
                            <td style="width: 50">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox2" runat="server" 
                                    Text='<%# Bind("Name") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox2Resource1">
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                                    ControlToValidate="RadTextBox2" 
                                    ErrorMessage="The textbox can not be empty!" 
                                    meta:resourcekey="RequiredFieldValidator1Resource1"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr class="titlename">
                            <td>
                                <asp:Label runat="server" ID="CurrencyCodeLb" Text="Currency Code:" 
                                    meta:resourcekey="CurrencyCodeLbResource1"></asp:Label>
                            </td>
                            <td style="width: 30">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox1" runat="server" 
                                    Text='<%# Bind("CurrencyCode") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox1Resource1">
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="Dynamic"
                                    ControlToValidate="RadTextBox1" 
                                    ErrorMessage="The textbox can not be empty!" 
                                    meta:resourcekey="RequiredFieldValidator2Resource1"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr class="titlename">
                            <td>
                                <asp:Label runat="server" ID="CurrencySignLb" Text="Currency Sign:" 
                                    meta:resourcekey="CurrencySignLbResource1"></asp:Label>
                            </td>
                            <td style="width: 30">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox3" runat="server" 
                                    Text='<%# Bind("CurrencySign") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox3Resource1">
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Display="Dynamic"
                                    ControlToValidate="RadTextBox1" 
                                    ErrorMessage="The textbox can not be empty!" 
                                    meta:resourcekey="RequiredFieldValidator3Resource1"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr class="titlename">
                            <td>
                                <asp:Label runat="server" ID="Label1" Text="Currency Rate:" 
                                    meta:resourcekey="Label1Resource1"></asp:Label>
                            </td>
                            <td style="width: 30">
                                1€ = <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox4" runat="server" 
                                    Text='<%# Bind("Rate") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox4Resource1">
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="Dynamic"
                                    ControlToValidate="RadTextBox1" 
                                    ErrorMessage="The textbox can not be empty!" 
                                    meta:resourcekey="RequiredFieldValidator4Resource1"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-bottom: 10; padding-top: 10" colspan="2">
                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" 
                                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' 
                                    meta:resourcekey="btnUpdateResource1">
                                </asp:Button>&nbsp;
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    CommandName="Cancel" meta:resourcekey="btnCancelResource1"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Office2007">
        </HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="GroupCurrencyEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableDelete="True" EnableFlattening="False"
        EnableInsert="True" EnableUpdate="True" EntitySetName="Currencies" 
        EntityTypeFilter="Currency" Select="">
    </asp:EntityDataSource>
</asp:Content>
